Skip to content

Fixes #19110: Add filters by IP addresses to PrimaryIPFilterSet #19160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

miaow2
Copy link
Contributor

@miaow2 miaow2 commented Apr 12, 2025

Fixes: #19110

Add filters by IP addresses to PrimaryIPFilterSet

@jnovinger jnovinger requested review from a team and jnovinger and removed request for a team April 14, 2025 13:00
params = {'primary_ip6_id': [addresses[2].pk]}
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 0)
params = {'primary_ip6': [str(addresses[2].address)]}
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miaow2 , can you please update these same tests in dcim.tests.test_filtersets.py:DeviceTestCase and dcim.tests.test_filtersets.py:VirtualDeviceContextTestCase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnovinger Hi, I've updated tests dcim.tests.test_filtersets.py:DeviceTestCase and dcim.tests.test_filtersets.py:VirtualDeviceContextTestCase

@miaow2 miaow2 requested a review from jnovinger April 17, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow VirtualMachine and Device filter by IP address from Primary IP
2 participants